<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>
  <script>
    /* 输入（参数）->函数-> 输出（返回值） */
    // const str字符串 = String(任意值);

    console.log(`String(100)->${String(100)}`);
    console.log(`String(true)->${String(true)}`);
    console.log(`String(null)->${String(null)}`);
    console.log(`String(undefined)->${String(undefined)}`);
    console.log(`String(NaN)->${String(NaN)}`);
    console.log(`String(Infinity)->${String(Infinity)}`);
    console.log(`String(100n)->${String(100n)}`);
    console.log(`String('hello')->${String('hello')}`);

    /* --- */
    console.log(`String({})->${String({})}`);
    console.log(`String(alert)->${String(alert)}`);
    console.log(`String(Symbol())->${String(Symbol())}`);


  </script>
</body>

</html>